package com.iplay.service.query;

public abstract class Query {
	
	public abstract QueryTreeNode buildQueryTree();

	public static class QueryTreeNode{
		private QueryTreeNodeValue value;
		private QueryTreeNode left;
		private QueryTreeNode right;
		
		public QueryTreeNode(QueryTreeNodeValue value, QueryTreeNode left, QueryTreeNode right) {
			this.value = value;
			this.left = left;
			this.right = right;
		}
		
		public QueryTreeNode(QueryTreeNodeValue value) {
			this.value = value;
		}

		public QueryTreeNodeValue getValue() {
			return value;
		}

		public void setValue(QueryTreeNodeValue value) {
			this.value = value;
		}

		public QueryTreeNode getLeft() {
			return left;
		}

		public void setLeft(QueryTreeNode left) {
			this.left = left;
		}

		public QueryTreeNode getRight() {
			return right;
		}

		public void setRight(QueryTreeNode right) {
			this.right = right;
		}
	}
	
	public static interface QueryTreeNodeValue{}
	
	public static enum LogicalOperator implements QueryTreeNodeValue{
		AND, OR
	}
}
